﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

/// <summary>
/// 玩家指令同步系统
/// </summary>
/// <typeparam name="T"></typeparam>
public class CommandSyncSystem<T> : ViewSystemBase where T : PlayerCommandBase, new()
{
    public override void OnInit()
    {
        base.OnInit();
    }

    public override void OnDispose()
    {
        base.OnDispose();
    }

    public override Type[] GetFilter()
    {
        return base.GetFilter();
    }
    public virtual void AddComp(ECSEntityBase entity) { }
    public override void BeforeFixedUpdate(int delaTime)
    {
        base.BeforeFixedUpdate(delaTime);
    }
    /// <summary>
    /// 重演算的时候读取输入缓存
    /// </summary>
    /// <param name="frame"></param>
    /// <param name="deltaTime"></param>
    public virtual void OnlyCallByRecalc(int frame, int deltaTime) { }
    public void NoRecalcBeforeFixedUpdate(int deltaTime) { }
    public virtual void SelfCommandLogic(ECSEntityBase entity) { }
    public virtual void OtherCommandLogic(ECSEntityBase entity) { }
    public virtual void BuildCommand(T command) { }
    }

